using Google.ProtocolBuffers;
using micromsgBackground.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsgBackground
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class NewSyncRequest : GeneratedMessageLite<NewSyncRequest, NewSyncRequest.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<NewSyncRequest, NewSyncRequest.Builder>
		{
			private bool resultIsReadOnly;
			private NewSyncRequest result;
			protected override NewSyncRequest.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override NewSyncRequest MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override NewSyncRequest DefaultInstanceForType
			{
				get
				{
					return NewSyncRequest.DefaultInstance;
				}
			}
			public CmdList Oplog
			{
				get
				{
					return this.result.Oplog;
				}
				set
				{
					this.SetOplog(value);
				}
			}
			public uint Selector
			{
				get
				{
					return this.result.Selector;
				}
				set
				{
					this.SetSelector(value);
				}
			}
			public SKBuiltinBuffer_t KeyBuf
			{
				get
				{
					return this.result.KeyBuf;
				}
				set
				{
					this.SetKeyBuf(value);
				}
			}
			public uint Scene
			{
				get
				{
					return this.result.Scene;
				}
				set
				{
					this.SetScene(value);
				}
			}
			public Builder()
			{
				this.result = NewSyncRequest.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(NewSyncRequest cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private NewSyncRequest PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					NewSyncRequest other = this.result;
					this.result = new NewSyncRequest();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override NewSyncRequest.Builder Clear()
			{
				this.result = NewSyncRequest.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override NewSyncRequest.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new NewSyncRequest.Builder(this.result);
				}
				return new NewSyncRequest.Builder().MergeFrom(this.result);
			}
			public override NewSyncRequest BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override NewSyncRequest.Builder MergeFrom(IMessageLite other)
			{
				if (other is NewSyncRequest)
				{
					return this.MergeFrom((NewSyncRequest)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override NewSyncRequest.Builder MergeFrom(NewSyncRequest other)
			{
				return this;
			}
			public override NewSyncRequest.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override NewSyncRequest.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(NewSyncRequest._newSyncRequestFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = NewSyncRequest._newSyncRequestFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 10u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 10u)
						{
							CmdList.Builder builder = CmdList.CreateBuilder();
							if (this.result.hasOplog)
							{
								builder.MergeFrom(this.Oplog);
							}
							input.ReadMessage(builder, extensionRegistry);
							this.Oplog = builder.BuildPartial();
							continue;
						}
					}
					else
					{
						if (num3 == 16u)
						{
							this.result.hasSelector = input.ReadUInt32(ref this.result.selector_);
							continue;
						}
						if (num3 == 26u)
						{
							SKBuiltinBuffer_t.Builder builder2 = SKBuiltinBuffer_t.CreateBuilder();
							if (this.result.hasKeyBuf)
							{
								builder2.MergeFrom(this.KeyBuf);
							}
							input.ReadMessage(builder2, extensionRegistry);
							this.KeyBuf = builder2.BuildPartial();
							continue;
						}
						if (num3 == 32u)
						{
							this.result.hasScene = input.ReadUInt32(ref this.result.scene_);
							continue;
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public NewSyncRequest.Builder SetOplog(CmdList value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasOplog = true;
				this.result.oplog_ = value;
				return this;
			}
			public NewSyncRequest.Builder SetOplog(CmdList.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasOplog = true;
				this.result.oplog_ = builderForValue.Build();
				return this;
			}
			public NewSyncRequest.Builder MergeOplog(CmdList value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasOplog && this.result.oplog_ != CmdList.DefaultInstance)
				{
					this.result.oplog_ = CmdList.CreateBuilder(this.result.oplog_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.oplog_ = value;
				}
				this.result.hasOplog = true;
				return this;
			}
			public NewSyncRequest.Builder ClearOplog()
			{
				this.PrepareBuilder();
				this.result.hasOplog = false;
				this.result.oplog_ = null;
				return this;
			}
			public NewSyncRequest.Builder SetSelector(uint value)
			{
				this.PrepareBuilder();
				this.result.hasSelector = true;
				this.result.selector_ = value;
				return this;
			}
			public NewSyncRequest.Builder ClearSelector()
			{
				this.PrepareBuilder();
				this.result.hasSelector = false;
				this.result.selector_ = 0u;
				return this;
			}
			public NewSyncRequest.Builder SetKeyBuf(SKBuiltinBuffer_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasKeyBuf = true;
				this.result.keyBuf_ = value;
				return this;
			}
			public NewSyncRequest.Builder SetKeyBuf(SKBuiltinBuffer_t.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasKeyBuf = true;
				this.result.keyBuf_ = builderForValue.Build();
				return this;
			}
			public NewSyncRequest.Builder MergeKeyBuf(SKBuiltinBuffer_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasKeyBuf && this.result.keyBuf_ != SKBuiltinBuffer_t.DefaultInstance)
				{
					this.result.keyBuf_ = SKBuiltinBuffer_t.CreateBuilder(this.result.keyBuf_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.keyBuf_ = value;
				}
				this.result.hasKeyBuf = true;
				return this;
			}
			public NewSyncRequest.Builder ClearKeyBuf()
			{
				this.PrepareBuilder();
				this.result.hasKeyBuf = false;
				this.result.keyBuf_ = null;
				return this;
			}
			public NewSyncRequest.Builder SetScene(uint value)
			{
				this.PrepareBuilder();
				this.result.hasScene = true;
				this.result.scene_ = value;
				return this;
			}
			public NewSyncRequest.Builder ClearScene()
			{
				this.PrepareBuilder();
				this.result.hasScene = false;
				this.result.scene_ = 0u;
				return this;
			}
		}
		public const int OplogFieldNumber = 1;
		public const int SelectorFieldNumber = 2;
		public const int KeyBufFieldNumber = 3;
		public const int SceneFieldNumber = 4;
		private static readonly NewSyncRequest defaultInstance;
		private static readonly string[] _newSyncRequestFieldNames;
		private static readonly uint[] _newSyncRequestFieldTags;
		private bool hasOplog;
		private CmdList oplog_;
		private bool hasSelector;
		private uint selector_;
		private bool hasKeyBuf;
		private SKBuiltinBuffer_t keyBuf_;
		private bool hasScene;
		private uint scene_;
		private int memoizedSerializedSize = -1;
		public static NewSyncRequest DefaultInstance
		{
			get
			{
				return NewSyncRequest.defaultInstance;
			}
		}
		public override NewSyncRequest DefaultInstanceForType
		{
			get
			{
				return NewSyncRequest.DefaultInstance;
			}
		}
		protected override NewSyncRequest ThisMessage
		{
			get
			{
				return this;
			}
		}
		public CmdList Oplog
		{
			get
			{
				return this.oplog_ ?? CmdList.DefaultInstance;
			}
		}
		public uint Selector
		{
			get
			{
				return this.selector_;
			}
		}
		public SKBuiltinBuffer_t KeyBuf
		{
			get
			{
				return this.keyBuf_ ?? SKBuiltinBuffer_t.DefaultInstance;
			}
		}
		public uint Scene
		{
			get
			{
				return this.scene_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasOplog && this.hasSelector && this.hasKeyBuf && this.Oplog.IsInitialized && this.KeyBuf.IsInitialized;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasOplog)
				{
					num += CodedOutputStream.ComputeMessageSize(1, this.Oplog);
				}
				if (this.hasSelector)
				{
					num += CodedOutputStream.ComputeUInt32Size(2, this.Selector);
				}
				if (this.hasKeyBuf)
				{
					num += CodedOutputStream.ComputeMessageSize(3, this.KeyBuf);
				}
				if (this.hasScene)
				{
					num += CodedOutputStream.ComputeUInt32Size(4, this.Scene);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private NewSyncRequest()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] newSyncRequestFieldNames = NewSyncRequest._newSyncRequestFieldNames;
			if (this.hasOplog)
			{
				output.WriteMessage(1, newSyncRequestFieldNames[1], this.Oplog);
			}
			if (this.hasSelector)
			{
				output.WriteUInt32(2, newSyncRequestFieldNames[3], this.Selector);
			}
			if (this.hasKeyBuf)
			{
				output.WriteMessage(3, newSyncRequestFieldNames[0], this.KeyBuf);
			}
			if (this.hasScene)
			{
				output.WriteUInt32(4, newSyncRequestFieldNames[2], this.Scene);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasOplog)
			{
				num ^= this.oplog_.GetHashCode();
			}
			if (this.hasSelector)
			{
				num ^= this.selector_.GetHashCode();
			}
			if (this.hasKeyBuf)
			{
				num ^= this.keyBuf_.GetHashCode();
			}
			if (this.hasScene)
			{
				num ^= this.scene_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object value)
		{
			NewSyncRequest newSyncRequest = value as NewSyncRequest;
			return newSyncRequest != null && (this.hasOplog == newSyncRequest.hasOplog && (!this.hasOplog || this.oplog_.Equals(newSyncRequest.oplog_))) && (this.hasSelector == newSyncRequest.hasSelector && (!this.hasSelector || this.selector_.Equals(newSyncRequest.selector_))) && (this.hasKeyBuf == newSyncRequest.hasKeyBuf && (!this.hasKeyBuf || this.keyBuf_.Equals(newSyncRequest.keyBuf_))) && (this.hasScene == newSyncRequest.hasScene && (!this.hasScene || this.scene_.Equals(newSyncRequest.scene_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<NewSyncRequest, NewSyncRequest.Builder>.PrintField("Oplog", this.hasOplog, this.oplog_, writer);
			GeneratedMessageLite<NewSyncRequest, NewSyncRequest.Builder>.PrintField("Selector", this.hasSelector, this.selector_, writer);
			GeneratedMessageLite<NewSyncRequest, NewSyncRequest.Builder>.PrintField("KeyBuf", this.hasKeyBuf, this.keyBuf_, writer);
			GeneratedMessageLite<NewSyncRequest, NewSyncRequest.Builder>.PrintField("Scene", this.hasScene, this.scene_, writer);
		}
		public static NewSyncRequest ParseFrom(byte[] data)
		{
			return NewSyncRequest.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private NewSyncRequest MakeReadOnly()
		{
			return this;
		}
		public static NewSyncRequest.Builder CreateBuilder()
		{
			return new NewSyncRequest.Builder();
		}
		public override NewSyncRequest.Builder ToBuilder()
		{
			return NewSyncRequest.CreateBuilder(this);
		}
		public override NewSyncRequest.Builder CreateBuilderForType()
		{
			return new NewSyncRequest.Builder();
		}
		public static NewSyncRequest.Builder CreateBuilder(NewSyncRequest prototype)
		{
			return new NewSyncRequest.Builder(prototype);
		}
		static NewSyncRequest()
		{
			NewSyncRequest.defaultInstance = new NewSyncRequest().MakeReadOnly();
			NewSyncRequest._newSyncRequestFieldNames = new string[]
			{
				"KeyBuf",
				"Oplog",
				"Scene",
				"Selector"
			};
			NewSyncRequest._newSyncRequestFieldTags = new uint[]
			{
				26u,
				10u,
				32u,
				16u
			};
			object.ReferenceEquals(micromsgBackground.Proto.NewSyncRequest.Descriptor, null);
		}
	}
}
